﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CustomControls.Atoms
{
    public partial class HeaderResources : UserControl
    {
        public HeaderResources()
        {
            InitializeComponent();
            //resourcesMax = new DBO.Economy.Resources();
            Resources = new DBO.Economy.Resources();
        }

        private DBO.Economy.Resources resources;

        public DBO.Economy.Resources Resources
        {
            get { return resources; }
            set
            {
                resources = value;
                if (value == null)
                    return;
                WoodLabel.Text = value.Wood.ToString();
                StoneLabel.Text = value.Stone.ToString();
                GoldLabel.Text = value.Gold.ToString();
                FoodLabel.Text = value.Food.ToString();
            }
        }

        /*private DBO.Economy.Resources resourcesMax;

        public DBO.Economy.Resources ResourcesMax
        {
            get { return resourcesMax; }
            set
            {
                resourcesMax = value;
                if (value == null)
                    return;
                WoodLabel.Text = resources.Wood.ToString() + "/" + value.Wood.ToString();
                StoneLabel.Text = resources.Stone.ToString() + "/" + value.Stone.ToString();
                GoldLabel.Text = resources.Gold.ToString() + "/" + value.Gold.ToString();
                FoodLabel.Text = resources.Food.ToString() + "/" + value.Food.ToString();
            }
        }*/
    }
}
